/**
 * 
 */
package com.jdd.common.util;

import java.util.ArrayList;
import java.util.List;

/*** 功能描述: 星期对应的数字
 * @Author: lcy
 * @Date: 2022/1/4
 */
public enum WeekType {

    MONDAY(2,1,"星期一"),
    TUESDAY(3,2,"星期二"),
    WEDNESDAY(4,3,"星期三"),
    THURSDAY(5,4,"星期四"),
    FRIDAY(6,5,"星期五"),
    SATURDAY(7,6,"星期六"),
    SUNDAY(1,7,"星期日");

	private final Integer ledNum;
	private final Integer weekNum;
    private final String detail;

    WeekType(Integer ledNum, Integer weekNum, String detail) {
        this.ledNum = ledNum;
        this.weekNum = weekNum;
        this.detail = detail;
    }

    public Integer getLedNum() {
        return ledNum;
    }

    public Integer getWeekNum() {
        return weekNum;
    }

    public String getDetail() {
        return detail;
    }

    public static Integer getLedNumByWeekNum(int weekNum){
	    for(WeekType vl : WeekType.values()){
	      if(vl.getWeekNum()==weekNum){
	        return vl.getLedNum();
	      }
	    }
	    return null;
	  }
}
